#include"../include/cmd.h"

void getrandomsalt(char* salt)
{
    char str[13]={0};
    str[0]='$';
    str[1]='6';
    str[2]='$';
    srand(time(NULL));
    for(int i=3;i<11;i++)
    {
        int j=rand()%3;
        switch(j)
        {
        case 0:
            str[i]=rand()%26+'A';
            break;
        case 1:
            str[i]=rand()%26+'a';
            break;
        case 2:
            str[i]=rand()%10+'0';
            break;
        }
    }
    str[11]='$';
    strcpy(salt,str);
    return ;
}
